import { IGaeaSetting } from '../../defines/application';

export class Props {
  public editSetting: IGaeaSetting = {
    key: 'gaea-detail',
    name: 'Detail',
    grouping: 'otherType',
    isContainer: true,
    collectType: 1,
    childrenContainer: 'detailbody',
    childExpressWay: 'template',
    editors: [
      {
        field: 'name',
        text: 'Label',
        type: 'string',
        specialType: 'title'
      },
      {
        field: 'actionName',
        text: 'ActionName',
        type: 'string'
      },
      {
        field: 'layout',
        type: 'radio',
        text: 'Layout',
        data: [
          { text: '列表', value: 'list' },
          { text: '表格', value: 'table' }
        ]
      },
      // 高级设置
      {
        group: 'Advanced', // 分组 --- 高级设置 or 基础设置(默认)
        field: 'visibleConditions',
        text: 'Condition',
        type: 'Condition'
      }
    ]
  };
  public form: any;
  public className = '';
  public name = '明细';
  public childTemplate?: string;
  public value?: any;
  public code: string;
  public layout: 'list' | 'table' = 'list';
  public actionName = '增加明细';
  public hideAddBtn = false;
  public hideDelBtn?: boolean = false;
  public renderMode?: FormRenderModes;
  public formValues?: any;
  public visibleConditions?: any;
  public onContentChange?: (params: any) => void;
}

export class State {
  ids: any;
  values: any;
}

export const optionsWidth = {
  inputitem: 246,
  textareaitem: 246,
  checkbox: 246,
  file: 246,
  inputmoney: 136,
  inputnumber: 136,
  radio: 136,
  contact: 136,
  dept: 136,
  datepicker: 136,
  imagepicker: 136
};
